]> permondes.de Git - Analog_Engine.git/blame - scripts/alpaca23 partial differential equation.LACE
Quantum Well
[Analog_Engine.git] / scripts / alpaca23 partial differential equation.LACE
CommitLineData
56968557
P
1# Solving partial differential equations by descretizing space
2# This is an adoption of the application note “alpaca_23” from Anabrid [https://analogparadigm.com/downloads/alpaca_23.pdf]
3# THAT only has 5 integrators, thus we have to reduce the number of elements
4#
5# u_0 = delta_t
6# u''_1 = u_0 - 2*u_1 + u_2
7# u''_2 = u_1 - 2*u_2 + u_3
8# u_3 = 0
9
10coefficient(1): f1 # fix to 0.2 to get 2 for the integration
11coefficient(2): f2 # fix to 0.2 to get 2 for the integration
12coefficient(5): 1 -> delta_t
13u_0 = delta_t
14coefficient(6): 0 -> u_3
15
16iintegrate u_0, 10*:-f1u_1, u_2 -> -u'_1 # input is u''_1
17iintegrate -u'_1 -> u_1
18invert u_1 -> -u_1
19-u_1 * f1 -> -f1u_1
20
21iintegrate u_1, 10*:-f2u_2, u_3 -> -u'_2 # input is u''_2
22iintegrate -u'_2 -> u_2
23invert u_2 -> -u_2
24-u_2 * f2 -> -f2u_2
25
26output(x): u_1
27output(y): u_2